package com.moli.iov.sys.model.dto.res;

import com.moli.iov.sys.model.po.Permission;
import com.moli.iov.sys.model.po.User;
import java.io.Serializable;
import java.util.List;
import lombok.Data;

/**
 * <p>
 * 登录出参DTO
 * </p>
 *
 * @author zql
 * @since 2019/9/26 14:41
 */
@Data
public class LoginDto implements Serializable {

  private static final long serialVersionUID = 6523310035238850105L;

  public LoginDto(User user, List<Permission> permissions,
      List<Permission> apiPermissions, String token) {
    this.user = user;
    this.permissions = permissions;
    this.apiPermissions = apiPermissions;
    this.token = token;
  }

  /**
   * 用户信息
   */
  private User user;

  /**
   * 菜单、按钮 权限
   */
  private List<Permission> permissions;

  /**
   * api权限
   */
  private List<Permission> apiPermissions;

  /**
   * token
   */
  private String token;
}
